{% load static %}
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>投票结果</title>
    <link rel="stylesheet" href="{% static 'polls/style.css' %}">
</head>
<body>
    <div class="container">
        <h1>{{ question.question_text }}</h1>

        <ul class="results-list">
        {% for choice in question.choice_set.all %}
            <li>
                <span>{{ choice.choice_text }}</span>
                <span class="vote-count">{{ choice.votes }} 票</span>
            </li>
        {% endfor %}
        </ul>

        <div style="margin-top: 20px;">
            <a href="{% url 'polls:detail' question.id %}" class="btn">重新投票</a>
            <a href="{% url 'polls:index' %}" class="btn" style="background: #95a5a6; margin-left: 10px;">返回列表</a>
        </div>
    </div>
</body>
</html>